﻿import request from '/@/utils/request';
enum Api {
  AddVehicle = '/api/vehicle/add',
  DeleteVehicle = '/api/vehicle/delete',
  UpdateVehicle = '/api/vehicle/update',
  PageVehicle = '/api/vehicle/page',
  DetailVehicle = '/api/vehicle/detail',
  GetOccupantAuditPeopleIdDropdown = '/api/vehicle/OccupantAuditPeopleIdDropdown',
  GetStallStallIdDropdown = '/api/vehicle/StallStallIdDropdown',
  GetCommunityRoomIdDropdown = '/api/vehicle/CommunityRoomIdDropdown',
}

// 增加车辆信息表
export const addVehicle = (params?: any) =>
	request({
		url: Api.AddVehicle,
		method: 'post',
		data: params,
	});

// 删除车辆信息表
export const deleteVehicle = (params?: any) => 
	request({
			url: Api.DeleteVehicle,
			method: 'post',
			data: params,
		});

// 编辑车辆信息表
export const updateVehicle = (params?: any) => 
	request({
			url: Api.UpdateVehicle,
			method: 'post',
			data: params,
		});

// 分页查询车辆信息表
export const pageVehicle = (params?: any) => 
	request({
			url: Api.PageVehicle,
			method: 'post',
			data: params,
		});

// 详情车辆信息表
export const detailVehicle = (id: any) => 
	request({
			url: Api.DetailVehicle,
			method: 'get',
			data: { id },
		});

export const getOccupantAuditPeopleIdDropdown = () =>
		request({
		url: Api.GetOccupantAuditPeopleIdDropdown,
		method: 'get'
		});
export const getStallStallIdDropdown = () =>
		request({
		url: Api.GetStallStallIdDropdown,
		method: 'get'
		});
export const getCommunityRoomIdDropdown = () =>
		request({
		url: Api.GetCommunityRoomIdDropdown,
		method: 'get'
		});

